public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree=new TestBinaryTree();
        TestBinaryTree.TreeNode root=testBinaryTree.createTree();

        System.out.println("=========前序遍历=======");
        testBinaryTree.preOrder(root);
        System.out.println();

        System.out.println("=========中序遍历=======");
        testBinaryTree.inOrder(root);
        System.out.println();

        System.out.println("=========后序遍历=======");
        testBinaryTree.postOrder(root);
        System.out.println();

        System.out.println("=========获取树中节点个数=======");
        System.out.println(testBinaryTree.size(root));

        testBinaryTree.size2(root);
        System.out.println(testBinaryTree.nodeSize);

        System.out.println("=========获取树中叶子节点个数=======");
        System.out.println(testBinaryTree.leafNodeSize(root));

        testBinaryTree.leafNodeSize2(root);
        System.out.println(testBinaryTree.leafNodeCount);

        System.out.println("=========获取树中第k层节点个数=======");
        System.out.println(testBinaryTree.levelKCount(root,3));

        System.out.println("=========获取树的最大高度=======");
        System.out.println(testBinaryTree.getHeight(root));

        System.out.println("=========找到val所在节点=======");
        System.out.println(testBinaryTree.find(root,'E').val);

    }
}
